home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / July 96 / RE Part Scripting Question < prev    next >
Encoding:
Internet Message Format  |  1996-07-31  |  1.9 KB  |  [TEXT/ttxt]

  1. Subject:     RE: Part Scripting Question
  2. Sent:        7/31/96 3:46 PM
  3. Received:    7/31/96 4:11 PM
  4. From:        Chris Hunt, chris_hunt@yes.optus.com.au
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Serge wrote:
  9.  
  10. "Since scriptable parts inherit from FW_MPartScriptable (or
  11. FW_MEmbeddingPartScriptable), it looks like parts can have properties.
  12. However, I can't figure out how one does specify part properties inside the
  13. 'aete' resource. Can someone tell me how this is done?"
  14.  
  15. Here's a snippet based on the OpenDoc PartMaker sample code for scriptable part editors (aete resource file) and my part editor:
  16.  
  17. *****
  18.         /*
  19.          *-------------------------------------------
  20.          * Classes
  21.          *-------------------------------------------
  22.          */
  23.         {
  24.             /*
  25.              *-------------------------------------------
  26.              * cPart
  27.              *-------------------------------------------
  28.              */
  29.             "CLA_SUIR",
  30.             kCLA_SUIREditorOSType,
  31.             "The root CLA_SUIR object.",
  32.             {
  33.                 /*
  34.                  *======================================================
  35.                  * New Properties
  36.                  *======================================================
  37.                  */
  38.                  
  39.                 /*
  40.                  * pContents
  41.                  */
  42.                 "contents",
  43.                 pContents,
  44.                 typeChar,
  45.                 "The text displayed by the part.",
  46.                 reserved,
  47.                 singleItem,
  48.                 notEnumerated,
  49.                 readWrite,
  50.                 reserved, reserved, reserved, reserved, reserved, reserved, reserved, reserved,
  51.                 noApostrophe,
  52.                 notFeminine,
  53.                 notMasculine,
  54.                 singular,
  55.             },
  56.             {
  57.                 /*
  58.                  *======================================================
  59.                  * Contained Elements
  60.                  *======================================================
  61.                  */
  62.  
  63.             },
  64.  
  65.             ...
  66.         }
  67. *****
  68. The above aete text defines the cPart class with a property named pContents.
  69.  
  70. 'hope that this helps.
  71.  
  72. Regards,
  73.  
  74. Christopher Hunt    ?%^)
  75. Class Action Pty. Ltd.
  76. Wollongong, NSW
  77. AUSTRALIA
  78.  
  79. e-mail: chris_hunt@yes.optus.com.au
  80.